package littlepicture.utils
{
	import littlepicture.config.ConfigProperties;
	import littlepicture.model.EmployeeModel;
	import littlepicture.model.RecordModel;
	import littlepicture.views.RecordField;
	
	public class RecordUtil{
		public static function createRecordText(recordModel:RecordModel):RecordField{
			var text:RecordField = new RecordField();
			text.recordModel = recordModel;
   		    if(recordModel !== null){
   		    	text.htmlText = ConfigProperties.STATUS_PREFIX + recordModel.content;
   		    	var status:String = recordModel.status;
   		    	if(status.toLowerCase() == ConfigProperties.STATUS_ACTIVE_DESCRIPTION){
   		    	   text.setStyle("color",ConfigProperties.COLOR_ACTIVE);
   		    	}else if(status.toLowerCase() == ConfigProperties.STATUS_COMPLETE_DESCRIPTION){
   		    	   text.setStyle("color",ConfigProperties.COLOR_COMPLETE);
   		    	}else if(status.toLowerCase() == ConfigProperties.STATUS_PENDING_DESCRIPTION){
   		    	   text.setStyle("color",ConfigProperties.COLOR_PENDING);
   		    	}
   		    } 		    
   		    return text;
		} 
	}
}